url = "/account/billing-address.html"
title = 'customer-address'
description = "用户地址信息页"
layout = "default"
==
{% set orders = catalog.orders %}
{% set Addresses = catalog.getAddresses %}
<link href="{{ 'assets/css/cashier.css'|theme }}" rel="stylesheet" type="text/css" />
<!-- contents -->
<div id="contents">
	<nav class="crumbs_nav">
		<ul class="crumbs_list rdstr">
			<li class="crumbs_item">
				<a class="crumbs_link" href="/">
					<span>{{ 'Home'|_ }}</span>
				</a>
			</li>
			<li class="crumbs_item">
				<a class="crumbs_link" href="{{ 'account/dashboard'|page }}">
					<span>{{ 'My account'|_ }}</span>
				</a>
			</li>
			<li class="crumbs_item no_deco">
				<span class="crumbs_link">{{ 'billing-address'|_ }}</span>
			</li>
		</ul>
	</nav>
	<h3 class="title_main">{{ 'billing-address'|_ }}</h3>
	<section class="mb20">
		<div class="tab_liquid">
			<ul class="box_list">
				<li class="selected">
					<span class="tab_liquid_list_inner">{{ 'Billing Address'|_ }}</span>
				</li>
				<li>
					<a class="tab_liquid_list_inner" href="{{ 'account/shipping-address'|page }}">{{ 'Shipping Address'|_ }}</a>
				</li>
			</ul>
		</div>
		<section>
			{{ form_open({ 'class': 'form-horizontal addressForm', 'request': 'onUpdateBillingAddress' }) }}
				<ul class="_addInput">
					<li class="cashier_section_line _addInput_unit _editMode _on">
						<div class="cashierSelectContents_innerContents _addInput_item">
							<div class="cashierSelectContents_1stLevel cashier_section_line">
								<dl>
									<dt class="cashierSelectContents_title fwb">
                    <div class="box_list">
                        <div class="cashierSelectContents_paymentSelect box_list_main">
                            {{ 'First name'|_ }}<span class="force_color">*</span>
                        </div>
                        <div class="mh10"></div>
                        <div class="cashierSelectContents_paymentSelect box_list_main">
                            {{ 'Last name'|_ }}<span class="force_color">*</span>
                        </div>
                    </div>
                  </dt>
									<dd class="clearfix">
										<input style="width: 47%;" class="commonInput_inputText fl" type="text" name="b_firstname" value="{{ user.user_extend.b_firstname ? user.user_extend.b_firstname : old('b_firstname') }}" size="8" maxlength="20" >
										<input style="width: 47%;" class="commonInput_inputText fr" type="text" name="b_lastname" value="{{ user.user_extend.b_lastname ? user.user_extend.b_lastname : old('b_lastname') }}" size="8" maxlength="20">
                  </dd>
								</dl>
							</div>
							<div class="cashierSelectContents_1stLevel cashier_section_line">
								<dl>
									<dt class="cashierSelectContents_title fwb">
										{{ 'Phone number'|_ }}
										<br>
									</dt>
									<dd>
										<input class="commonInput_inputText" type="tel" name="b_phonenumber" value="{{ user.user_extend.b_phonenumber ? user.user_extend.b_phonenumber : old('b_phonenumber') }}" size="11" maxlength="11"></dd>
								</dl>
							</div>
							<div class="cashierSelectContents_1stLevel cashier_section_line _postalCode">
								<dl>
									<dt class="cashierSelectContents_title fwb">{{ 'Postcode'|_ }}</dt>
									<dd class="clearfix">
										<input class="commonInput_inputText" type="tel" name="b_postcode" value="{{ user.user_extend.b_postcode ? user.user_extend.b_postcode : old('b_postcode') }}" maxlength="7" ></dd>
								</dl>
							</div>
							<div class="cashierSelectContents_2ndLevel cashier_section_line">
								<dl>
									<dt class="cashierSelectContents_title fwb">
                    <div class="box_list">
                        <div class="cashierSelectContents_paymentSelect box_list_main">
                            {{ 'Country'|_ }}<span class="force_color">*</span>
                        </div>
                        <div class="mh10"></div>
                        <div class="cashierSelectContents_paymentSelect box_list_main">
                            {{ 'State/Province'|_ }}<span class="force_color">*</span>
                        </div>
                    </div>
                  </dt>
									<dd>
										<div class="search_result_form_list_form">
											<div class="box_list">
												<div class="cashierSelectContents_paymentSelect box_list_main">
													<!-- <select class="commonSelect" name="">
														<option value="0" selected="">日本</option>
													</select> -->
													{{ form_select_country('b_country_id',
                                                    user.user_extend.b_country_id ? user.user_extend.b_country_id : old('b_country_id'), {
                                                    id: 'accountCountry',
                                                    class: 'commonSelect form-control',
                                                    emptyOption: 'Select a country',
                                                    'required': '',
                                                    'data-request': 'onPullBillingStateList',
                                                    'data-request-success': 'afterChangeCountry($el, data)',
                                                    'placeholder': 'Select your country'
                                                    }) }}
												</div>
												<div class="mh10"></div>
												<div class="cashierSelectContents_paymentSelect box_list_main">
													<!-- <select class="commonSelect" name="">
														<option value="0" selected="">東京都</option>
													</select> -->
						                             {{ form_select_state('b_state_id',
                                                        user.user_extend.b_country_id ? user.user_extend.b_country_id : old('b_country_id'),
                                                        user.user_extend.b_state_id ? user.user_extend.b_state_id : old('b_state_id'), {
                                                        id: 'state_id',
                                                        class: 'commonSelect form-control',
                                                        'required': '',
                                                      }) }}													
												</div>
											</div>
										</div>
									</dd>
								</dl>
							</div>
							<div class="cashierSelectContents_2ndLevel cashier_section_line">
								<dl>
									<dt class="cashierSelectContents_title fwb">
										{{ 'Street'|_ }}
										<br>
										<span class="fnt_xsmall fwn">{{ 'Street number'|_ }}</span>
									</dt>
									<dd>
										<input class="commonInput_inputText" type="text" maxlength="50" required name="b_city" value="{{ user.user_extend.b_city ? user.user_extend.b_city : old('b_city') }}" maxlength="40" ></dd>
								</dl>
							</div>
							<div class="cashierSelectContents_2ndLevel cashier_section_line">
								<dl>
									<dt class="cashierSelectContents_title fwb">{{ 'Building'|_ }}</dt>
									<dd>
										<input class="commonInput_inputText" type="text" name="b_address" value="{{ user.user_extend.b_address ? user.user_extend.b_address : old('b_address') }}" maxlength="40" ></dd>
								</dl>
							</div>
						</div>
					</li>
				</ul>
				<div class="cashierEditSumit cashier_section_line">
					<a class="_submit button_decide cartButton" href="#cashierEdit">
						<span class="button_txt">{{ 'Checkout'|_ }}</span>
					</a>
					<input class="_submitHide" type="submit" name="" value=""></div>
			{{ form_close() }}
	</section>
</section>
</div>
<!-- end contents -->